From f2ca2e12420e5678dfe3bc544d3181c0fcbc81a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Oct 2017 13:16:23 +0200 Subject: [PATCH] window: Make code snippets compile Fix the wrong signature of a size_allocate signal handler --- gtk/gtkwindow.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 4995e3867d..c259373cfd 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -5339,7 +5339,9 @@ gtk_window_resize (GtkWindow *window, * way that this code: * * |[ - * // width and height are set elsewhere + * GtkWindow *window = GTK_WINDOW (gtk_window_new (GTK_WINDOW_TOPLEVEL)); + * int width = 500; + * int height = 300; * gtk_window_resize (window, width, height); * * int new_width, new_height; @@ -5367,13 +5369,16 @@ gtk_window_resize (GtkWindow *window, * * |[ * static void - * on_size_allocate (GtkWidget *widget, GtkAllocation *allocation) + * on_size_allocate (GtkWidget *widget, + * const GtkAllocation *allocation, + * int baseline, + * GtkAllocation *out_clip) * { * int new_width, new_height; * * gtk_window_get_size (GTK_WINDOW (widget), &new_width, &new_height); * - * ... + * // ... * } * ]| * -- 2.30.2